/*******************************************************************************
 * Copyright (c) 2017 I3S laboratory and others.
 * All rights reserved. This program and the accompanying materials
 * are made available under the terms of the Eclipse Public License v1.0
 * which accompanies this distribution, and is available at
 * http://www.eclipse.org/legal/epl-v10.html
 *
 * Contributors:
 *     I3S laboratory - initial API and implementation
 *******************************************************************************/
/*
* generated by Xtext
*/
package org.eclipse.gemoc.moccml.mapping.xtext.ui.labeling;


import org.eclipse.emf.edit.ui.provider.AdapterFactoryLabelProvider;
import org.eclipse.gemoc.moccml.mapping.moccml_mapping.EventType;
import org.eclipse.gemoc.moccml.mapping.moccml_mapping.MoCCMLExpression;
import org.eclipse.gemoc.moccml.mapping.moccml_mapping.MoCCMLRelation;
import org.eclipse.ocl.xtext.completeocl.ui.labeling.CompleteOCLLabelProvider;

import com.google.inject.Inject;

/**
 * Provides labels for a EObjects.
 * 
 * see http://www.eclipse.org/Xtext/documentation/latest/xtext.html#labelProvider
 */
public class EclLabelProvider extends CompleteOCLLabelProvider {

	@Inject
	public EclLabelProvider(AdapterFactoryLabelProvider delegate) {
		super(delegate);
	}


	//Labels and icons can be computed like this:
	
	String text(MoCCMLRelation r) {
	  return r.getType().getName();
	}
	 
    String image(MoCCMLRelation r) {
      return "/org.eclipse.gemoc.moccml.mapping.xtext.ui/icons/relation_small.gif";
    }
    
    String text(EventType e) {
  	  return e.getName();
  	}
  	 
	String image(EventType r) {
	  return "/org.eclipse.gemoc.moccml.mapping.xtext.ui/icons/clock_small.gif";
	}
	

	String text(MoCCMLExpression e) {
		  return e.getType().getName();
		}
		 
    String image(MoCCMLExpression e) {
      return "/org.eclipse.gemoc.moccml.mapping.xtext.ui/icons/equation_small.gif";
    }
	
	
}
